<?php
namespace app\controller\en;

use think\facade\View;

use app\controller\en\Base;
use app\model\ProductsWireEn as ProductsWire;
use app\model\ProductsSurfaceEn as ProductsSurface;
use app\model\ProductsWearPlateEn as ProductsWearPlate;

class Product extends Base
{
    protected $wireTypes = ["", "Thermal spraying flux cored welding wire","Wear resistant thermal spraying welding wires","Primer thermal spraying welding wires"];

    // 热喷涂
    public function wire()
    {
        return View::fetch();
    }

    public function wirelist($type = 0)
    {
        $list = ProductsWire::where('wire_type', $type)->order('sort desc')->select();

        View::assign('wireType', $this->wireTypes[$type]);

        View::assign('list', $list);

        return View::fetch();
    }

    public function surface()
    {
        return View::fetch();
    }

    public function surfacelist()
    {
        $list = ProductsSurface::select();

        View::assign('list', $list);

        return View::fetch();
    }

    public function wearPlate()
    {
        $list = ProductsWearPlate::select();

        View::assign('list', $list);

        return View::fetch();
    }

    // 合金粉末 
    public function alloy_powders()
    {
        return View::fetch();
    }

    public function alloy_powders_list()
    {
        return View::fetch();
    }
}
